import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'

// 引入健康资讯相关组件
import HealthInfoList from '@/views/HealthConsult/HealthInfoList.vue'
import HealthInfoDetail from '@/views/HealthConsult/HealthInfoDetail.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/home',
      name: 'home',
      component: HomeView,
    },
    {
      path: '/about',
      name: 'about',
      // route level code-splitting
      // this generates a separate chunk (About.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import('../views/AboutView.vue'),
    },
    {
      path: '/',
      name: 'Login',
      // route level code-splitting
      // this generates a separate chunk (About.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import('../views/Login.vue'),
    },
    {
      path: '/queue-query',
      name: 'QueueQuery',
      component: () => import('../views/QueueQuery.vue'),
    },
    {
      path: '/self-payment',
      name: 'SelfPayment',
      component: () => import('../views/Pay/SelfPayment.vue'),
    },
    {
      path: '/payment-detail',
      name: 'payment-detail',
      component: () => import('../views/Pay/PaymentDetail.vue')
    },
    {
      path: '/payment-success',
      name: 'payment-success',
      component: () => import('../views/Pay/PaymentSuccess.vue')
    },
    {
      path: '/payment-success-detail',
      name: 'PaymentSuccessDetail',
      component: () => import('../views/Pay/PaymentSuccessDetail.vue')
    },
    {
      path: '/refund',
      name: 'refund',
      component: () => import('../views/Pay/RefundPage.vue')
    },
    {
      path: '/refund-form',
      name: 'RefundForm',
      component: () => import('../views/Pay/RefundForm.vue')
    },
    {
      path: '/recharge-card',
      name: 'RechargeCard',
      component: () => import('../views/Pay/RechargeCard.vue')
    },
    {
      path: '/recharge-records',
      name: 'RechargeRecords',
      component: () => import('../views/Pay/RechargeRecords.vue')
    },
    {
      path: '/patient-select',
      name: 'patient-select',
      component: () => import('../views/Pay/PatientSelect.vue')
    },
    {
      path: '/patient-list',
      name: 'PatientList',
      component: () => import('../views/AppointmentFunction/PatientList.vue'),
    },
    {
      path: '/department-select',
      name: 'DepartmentSelect',
      component: () => import('../views/AppointmentFunction/DepartmentSelect.vue'),
    },
    {
      path: '/doctor-schedule',
      name: 'DoctorSchedule',
      component: () => import('../views/AppointmentFunction/DoctorScheduleView.vue'),
    },
    {
      path: '/appointment-confirm',
      name: 'AppointmentConfirm',
      component: () => import('../views/AppointmentFunction/AppointmentConfirm.vue'),
    },
    {
      path: '/appointment',
      name: 'Appointment',
      component: () => import('../views/AppointmentFunction/Appointment.vue'),
    },
    {
      path: '/outpatient-fee',
      name: 'outpatient-fee',
      component: () => import('../views/OutpatientFee.vue')
    },
    {
      path: '/self-order',
      name: 'self-order',
      component: () => import('../views/SelfOrder/SelfOrderView.vue')
    },
    {
      path: '/hospital-list',
      name: 'hospital-list',
      component: () => import('../views/SelfOrder/HospitalListView.vue')
    },
    {
      path: '/drug-order',
      name: 'drug-order',
      component: () => import('../views/SelfOrder/DrugOrderView.vue')
    },
    {
      path: '/order-confirm',
      name: 'order-confirm',
      component: () => import('../views/SelfOrder/OrderConfirmView.vue')
    },
    {
      path: '/prescription-record',
      name: 'prescription-record',
      component: () => import('../views/SelfOrder/PrescriptionRecordView.vue')
    },
    {
      path: '/payment',
      name: 'prescription-payment',
      component: () => import('../views/SelfOrder/PrescriptionPaymentView.vue')
    },
    {
      path: '/prescription-detail',
      name: 'prescription-detail',
      component: () => import('../views/SelfOrder/PrescriptionDetailView.vue')
    },
    {
      path: '/fee-detail/:registerId',
      name: 'FeeDetail',
      component: () => import('../views/FeeDetail.vue'),
    },
    {
      path: '/patient-view',
      name: 'PatientView',
      component: () => import('../views/AppointmentFunction/PatientView.vue'),
    },
    {
      path: '/personal-center',
      name: 'PersonalCenter',
      component: () => import('../views/PersonalCenter.vue'),
    },

    // 健康资讯列表
    {
      path: '/health-info/list',
      name: 'healthInfoList',
      component: HealthInfoList
    },

    // 健康资讯详情
    {
      path: '/health-info/detail/:id',
      name: 'healthInfoDetail',
      component: HealthInfoDetail
    },
    // 价目查询
    {
      path: '/price-query',
      name: 'PriceQuery',
      component: () => import('../views/PriceInquiry/PriceQueryView.vue')
    },
    // 就医指南
    {
      path: '/medical-guide',
      name: 'MedicalGuide',
      component: () => import('../views/MedicalGuide/MedicalGuideView.vue')
    },
    // 就医指南文章列表
    {
      path: '/medical-guide/articles/:categoryId',
      name: 'GuideArticles',
      component: () => import('../views/MedicalGuide/GuideArticlesView.vue')
    },
    // 就医指南文章详情
    {
      path: '/medical-guide/detail/:articleId',
      name: 'GuideDetail',
      component: () => import('../views/MedicalGuide/GuideDetailView.vue')
    },
    {
      path: '/satisfaction-survey',
      name: 'SatisfactionSurvey',
      component: () => import('../views/SatisfactionSurvey.vue'),
    },
    {
      path: '/survey-form',
      name: 'SurveyForm',
      component: () => import('../views/SurveyForm.vue'),
    },
    {
      path: '/questionnaire-list',
      name: 'QuestionnaireList',
      component: () => import('../views/QuestionnaireList.vue'),
    },
    {
      path: '/questionnaire-detail',
      name: 'QuestionnaireDetail',
      component: () => import('../views/QuestionnaireDetail.vue'),
    },
    {
      path: '/submit-success',
      name: 'SubmitSuccess',
      component: () => import('../views/SubmitSuccess.vue'),
    },
    {
      path: '/ai-chat',
      name: 'AIChat',
      component: () => import('../views/AIChat.vue'),
    },
  ],
})



export default router
